import { useRoutes } from "react-router-dom";
import { px2remTransformer, StyleProvider } from '@ant-design/cssinjs';
import Auth from "./components/token";
const px2rem = px2remTransformer({
  rootValue: 16, // 32px = 1rem; @default 16
  precision: 3,
  mediaQuery: false,
});
import routers from "./routers";
console.info(
  '%c 太执着假洒脱这种爱太沉重',
  'background-color: #00BCD4; padding: 6px 12px; border-radius: 2px; font-size: 14px; color: #fff; text-transform: uppercase; font-weight: 600;',
);

const App = () => {
  const element = useRoutes(routers);
  if (!element) {
    return null;
  }
  return (
    <StyleProvider transformers={[px2rem]}>
      <Auth>
        {element}
      </Auth>
    </StyleProvider>

  );
}
export default App;
